#include<iostream>
using namespace std;
const int N = 1e5 + 10;
int arr[N], tree[N];
int ans[N];
int n;
int lowbit(int x)
{
	return x & -x;
}
void add(int x, int v)
{
	for (int i = x; i < N; i += lowbit(i)) {
		tree[i] += v;
	}
}
int sum(int x)
{
	int ans = 0;
	for (int i = x; i; i -= lowbit(i)) {
		ans += tree[i];
	}
	return ans;
}
int main()
{
	cin >> n;
	for (int i = 2; i <= n; i++) {
		cin >> arr[i];
	}
	for (int i = 1; i <= n; i++) {
		add(i, 1);
		//cout << arr[i] << " ";
	}
	for (int i = n; i; i--) {
		int k = arr[i] + 1;
		//cout << "k=====->" << k << endl;
		int l = 0, r = n + 1;	
		while (l + 1 != r) {
			int mid = l + r >> 1;
			if (sum(mid) < k)l = mid;
			else r = mid;
		}
		//cout << "l   r   " << l << "   " << r << endl;
		ans[i] = r;
		add(r, -1);
	}
	for (int i = 1; i <= n; i++) {
		cout << ans[i] << endl;			
	}
	return 0;
}